
cmake_minimum_required(VERSION 3.10.2)

project("useqtlib")

add_library(
        useqtlib
        SHARED
        native-lib.cpp)

# 添加头文件目录
include_directories(include)

# 添加引入的Qt编译的动态库
add_library(qt5core SHARED IMPORTED)
set_target_properties(qt5core
        PROPERTIES IMPORTED_LOCATION
        ${CMAKE_SOURCE_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}/libQt5Core_${CMAKE_ANDROID_ARCH_ABI}.so)

add_library(extqtlib SHARED IMPORTED)
set_target_properties(extqtlib
        PROPERTIES IMPORTED_LOCATION
        ${CMAKE_SOURCE_DIR}/libs/${CMAKE_ANDROID_ARCH_ABI}/libExtQtShare_${CMAKE_ANDROID_ARCH_ABI}.so)


find_library(
        log-lib
        log)

target_link_libraries( # Specifies the target library.
        useqtlib
        # 添加要链接的动态库
        qt5core
        extqtlib
        ${log-lib})